package com.poly.cms.pojo.dto;

import com.poly.common.core.web.domain.BaseDTO;
import com.poly.common.core.validate.Add;
import com.poly.common.core.validate.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 频道信息对象 cms_channel
 *
 * @author poly
 * @date 2023-10-25
 */
@ApiModel(value = "CmsChannelDTO", description = "频道信息")
@Data
public class CmsChannelDTO extends BaseDTO {
    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @ApiModelProperty("编号")
    @NotNull(message = "编号不能为空", groups = {Update.class})
    private Long id;

    /**
     * 频道名称
     */
    @ApiModelProperty("频道名称")
    @Size(message = "频道名称长度必须小于20个字符", max = 20, groups = {Add.class, Update.class})
    @NotBlank(message = "频道名称不能为空", groups = {Add.class, Update.class})
    //@Pattern(message = "频道名称格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String channelName;

    /**
     * 频道英文名称
     */
    @ApiModelProperty("频道英文名称")
    @Size(message = "频道英文名称长度必须小于36个字符", max = 36, groups = {Add.class, Update.class})
    @NotBlank(message = "频道英文名称不能为空", groups = {Add.class, Update.class})
    //@Pattern(message = "频道英文名称格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String englishName;

    /**
     * 上级编号
     */
    @ApiModelProperty("上级编号")
    private Long parentId;

    /**
     * 序号
     */
    @ApiModelProperty("序号")
    private Long sort;

    /**
     * 目标方式;BLANK,PARENT,TOP
     */
    @ApiModelProperty("目标方式;BLANK,PARENT,TOP")
    @Size(message = "目标方式;BLANK,PARENT,TOP长度必须小于10个字符", max = 10, groups = {Add.class, Update.class})
    //@Pattern(message = "目标方式;BLANK,PARENT,TOP格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String target;

    /**
     * 分组名称
     */
    @ApiModelProperty("分组名称")
    @Size(message = "分组名称长度必须小于36个字符", max = 36, groups = {Add.class, Update.class})
    //@Pattern(message = "分组名称格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String groupName;

    /**
     * 开启点赞
     */
    @ApiModelProperty("开启点赞")
    private Integer openLike;

    /**
     * 开启评论
     */
    @ApiModelProperty("开启评论")
    private Integer openComment;

    /**
     * 连接地址
     */
    @ApiModelProperty("连接地址")
    @Size(message = "连接地址长度必须小于255个字符", max = 255, groups = {Add.class, Update.class})
    //@Pattern(message = "连接地址格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String linkUrl;

    /**
     * 状态
     */
    @ApiModelProperty("状态")
    @NotNull(message = "状态不能为空", groups = {Add.class, Update.class})
    private Integer status;

    /**
     * 背景图
     */
    @ApiModelProperty("背景图")
    @Size(message = "背景图长度必须小于1000个字符", max = 1000, groups = {Add.class, Update.class})
    //@Pattern(message = "背景图格式不正确",regexp = “<正则表达式>”,groups = {Add.class,Update.class})
    private String image;

    /**
     * 删除标志
     */
    @ApiModelProperty(value = "删除标志", hidden = true)
//    @NotNull(message="删除标志不能为空", groups = {Add.class  })
    private Integer delFlag;


}
